import Request from "@/http/request";
import apiList from "@/api/apiList";
import { appSeverGatewayConfig } from "@/envConfig/config";
import baby from "@/baby";

const { env } = baby; //当前环境变量




const appServerBaseRequestClientForm = new Request({
  baseURL: `${appSeverGatewayConfig[env].baseUrl}${appSeverGatewayConfig[env].application}`,
  headers: {
    "content-type": "application/x-www-form-urlencoded"
  }
});

export const getWxUserInfo = (data = { code: '' }) => {
  return appServerBaseRequestClientForm.post(apiList.getWxUserInfo, {
    data: JSON.stringify(data),
  }).then(res => res.data);
};
export const saveUserInfo = (data = {}) => {
  return appServerBaseRequestClientForm.post(apiList.saveUserInfo, {
    data: JSON.stringify(data),
  }).then(res => res.data);
};
export const getUserCount = () => {
  return appServerBaseRequestClientForm.post(apiList.getUserCount).then(res => res.data);
};




